<MPSCNNBatchNormalizationDataSource >(3) MetalPerformanceShaders.framework <MPSCNNBatchNormalizationDataSource >(3)

<MPSCNNBatchNormalizationDataSource >

#import <MPSCNNBatchNormalization.h>

Inherits <MPSStateNSObject>, and <NSCopying>.


(NSUInteger) - numberOfFeatureChannels
(float *__nullable) - gamma
(float *__nullable) - beta
(float *__nullable) - mean
(float *__nullable) - variance
(BOOL) - load
(void) - purge
(NSString *__nullable) - label
(MPSCNNNormalizationGammaAndBetaState *__nullable) - updateGammaAndBetaWithCommandBuffer:batchNormalizationState:
(MPSCNNNormalizationMeanAndVarianceState *__nullable) - updateMeanAndVarianceWithCommandBuffer:batchNormalizationState:
(BOOL) - updateGammaAndBetaWithBatchNormalizationState:
(BOOL) - updateMeanAndVarianceWithBatchNormalizationState:
(float) - epsilon
(void) - encodeWithCoder:
(nullable instancetype) - initWithCoder:
(nonnull instancetype) - copyWithZone:device:


BOOL supportsSecureCoding

- (float * __nullable MPSCNNBatchNormalizationDataSource) beta [required]

Returns a pointer to the bias terms for the batch normalization. If NULL then no bias is to be applied.

- (nonnull instancetype MPSCNNBatchNormalizationDataSource) copyWithZone: (nullable NSZone *) zone(nullable id< MTLDevice >) device

Optional copy method to create a copy of the data source for use with a new device.

Parameters:

zone The NSZone on which to allocate.
device The device where the kernel which uses this data source will be used.

Returns:

A pointer to a copy of this data source.

- (void MPSCNNBatchNormalizationDataSource) encodeWithCoder: (NSCoder *__nonnull) aCoder [optional]

NSSecureCoding compatibility.

- (float MPSCNNBatchNormalizationDataSource) epsilon [optional]

An optional tiny number to use to maintain numerical stability. output_image = (input_image - mean[c]) * gamma[c] / sqrt(variance[c] + epsilon) + beta[c]; Defalt value if method unavailable: FLT_MIN

- (float * __nullable MPSCNNBatchNormalizationDataSource) gamma [required]

Returns a pointer to the scale factors for the batch normalization.

- (nullable instancetype MPSCNNBatchNormalizationDataSource) initWithCoder: (NSCoder *__nonnull) aDecoder [optional]

NSSecureCoding compatibility.

- (NSString* __nullable MPSCNNBatchNormalizationDataSource) label [required]

A label that is transferred to the batch normalization filter at init time Overridden by a MPSCNNBatchNormalizationNode.label if it is non-nil.

- (BOOL MPSCNNBatchNormalizationDataSource) load [required]

Alerts the data source that the data will be needed soon Each load alert will be balanced by a purge later, when MPS no longer needs the data from this object. Load will always be called atleast once after initial construction or each purge of the object before anything else is called.

Returns:

Returns YES on success. If NO is returned, expect MPS object construction to fail.

- (float * __nullable MPSCNNBatchNormalizationDataSource) mean [required]

Returns a pointer to batch mean values with which to initialize the state for a subsequent batch normalization.

- (NSUInteger MPSCNNBatchNormalizationDataSource) numberOfFeatureChannels [required]

Returns the number of feature channels within images to be normalized using the supplied parameters.

- (void MPSCNNBatchNormalizationDataSource) purge [required]

Alerts the data source that the data is no longer needed Each load alert will be balanced by a purge later, when MPS no longer needs the data from this object.

- (BOOL MPSCNNBatchNormalizationDataSource) updateGammaAndBetaWithBatchNormalizationState: (MPSCNNBatchNormalizationState *__nonnull) batchNormalizationState [optional]

Compute new gamma and beta values using current values and gradients contained within a MPSCNNBatchNormalizationState. Perform the update using the CPU.

Parameters:

batchNormalizationState The MPSCNNBatchNormalizationState object containing the current gamma and beta values and the gradient values.

Returns:

A boolean value indicating if the update was performed.

- (MPSCNNNormalizationGammaAndBetaState * __nullable MPSCNNBatchNormalizationDataSource) updateGammaAndBetaWithCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSCNNBatchNormalizationState *__nonnull) batchNormalizationState [optional]

Compute new gamma and beta values using current values and gradients contained within a MPSCNNBatchNormalizationState. Perform the update using a GPU. This operation is expected to also decrement the read count of batchNormalizationState by 1.

Parameters:

commandBuffer The command buffer on which to encode the update.
batchNormalizationState The MPSCNNBatchNormalizationState object containing the current gamma and beta values and the gradient values.

Returns:

A MPSCNNNormalizationMeanAndVarianceState object containing updated mean and variance values. If NULL, the MPSNNGraph batch normalization filter gamma and beta values will remain unmodified.

- (BOOL MPSCNNBatchNormalizationDataSource) updateMeanAndVarianceWithBatchNormalizationState: (MPSCNNBatchNormalizationState *__nonnull) batchNormalizationState [optional]

Compute new mean and variance values using current batch statistics contained within a MPSCNNBatchNormalizationState. Perform the update using the CPU.

Parameters:

batchNormalizationState The MPSCNNBatchNormalizationState object containing the current batch statistics.

Returns:

A boolean value indicating if the update was performed.

- (MPSCNNNormalizationMeanAndVarianceState * __nullable MPSCNNBatchNormalizationDataSource) updateMeanAndVarianceWithCommandBuffer: (nonnull id< MTLCommandBuffer >) commandBuffer(MPSCNNBatchNormalizationState *__nonnull) batchNormalizationState [optional]

Compute new mean and variance values using current batch statistics contained within a MPSCNNBatchNormalizationState. Perform the update using a GPU. This operation is expected to also decrement the read count of batchNormalizationState by 1.

Parameters:

commandBuffer The command buffer on which to encode the update.
batchNormalizationState The MPSCNNBatchNormalizationState object containing the current batch statistics.

Returns:

A MPSCNNNormalizationMeanAndVarianceState object containing updated mean and variance values. If NULL, the MPSNNGraph batch normalization filter mean and variance values will remain unmodified.

- (float * __nullable MPSCNNBatchNormalizationDataSource) variance [required]

Returns a pointer to batch variance values with which to initialize the state for a subsequent batch normalization.

- (BOOL MPSCNNBatchNormalizationDataSource) supportsSecureCoding [read], [optional], [atomic], [assign]

NSSecureCoding compatibility.

Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.

Mon Jul 9 2018 Version MetalPerformanceShaders-119.3